package o;

import android.content.Context;
import android.text.TextUtils;
import com.huawei.hms.aaid.constant.AaidIdConstant;
import java.io.File;

public class cys {
    private static final String ˊ;

    static {
        Context ॱ = cyn.ॱ();
        ˊ = ॱ != null ? ॱ.getFilesDir().getAbsolutePath() + "/FestivalImage/" : null;
    }

    public static String ˋ() {
        if (TextUtils.isEmpty(ˊ)) {
            return null;
        }
        File file = new File(ˊ);
        if (file.exists() || file.mkdirs()) {
            return ˊ;
        }
        return null;
    }

    public static void ˎ() {
        String ˋ = ˋ();
        if (ˋ != null && !cfn.ˊ(new File(ˋ))) {
            cyq.ˋ.ˊ("SplashScreenFile", "delete image file error," + ˋ);
        }
    }

    public static void ॱ(String str) {
        if (str != null && !cfn.ˊ(new File(str))) {
            cyq.ˋ.ˊ("SplashScreenFile", "delete image file error," + str);
        }
    }

    public static boolean ˏ(String str, String str2) {
        if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
            return false;
        }
        if (!new File(str).exists()) {
            cyq.ˋ.ˏ("SplashScreenFile", "file is not exist");
            return false;
        } else if (str2 == null || !str2.equalsIgnoreCase(cfn.ˏ(str, AaidIdConstant.SIGNATURE_SHA256))) {
            return false;
        } else {
            return true;
        }
    }
}
